Modern data center networks comprise network devices (NDs) or nodes that transport data through a data center network. The nodes may include servers, routers, switches, bridges, or combinations thereof that transport individual data packets or frames through the network. Some networks may offer data services that forward data frames or packets from one node to another node across the network without using pre-configured routes on intermediate nodes. Other networks may forward the data frames or packets from one node to another node across the network along pre-configured or pre-established paths.
A ND (e.g., server) in a data center may comprise a plurality of virtual machines (VMs) that run above a hypervisor (or VM manger) and managed by the hypervisor. Hypervisors in multiple network devices in the data center may create an emulated Layer 2 (L2) domain to connect the VMs. In addition, there may be a gateway (e.g., a default gateway) in the data center, which may perform Layer 3 (L3) routing between L2 domains or to other L3 domains. The emulation may use an encapsulation of a L2 packet on an Internet Protocol (IP) packet. Sometimes, different NDs may require different encapsulations of packets for communication with other NDs. For example, some hardware only-implemented gateways may require generic routing encapsulation-IP (GRE-IP) based encapsulation, while some software and hardware-implemented servers may require network virtualization over generic routing encapsulation (NVGRE) based encapsulation. In this case, packets encapsulated using different protocols may encounter potential issues when being forwarded between different NDs, e.g., between a server and a gateway.